/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package connection;

/**
 *
 * @author Nerus
 */
import java.io.*;
import java.net.*;

public class server {

    ServerSocket ss;
    Socket s;
    static int port = 80;

    public server() throws IOException {
        
        int number = 0;
        try {
            ss = new ServerSocket(88);
            while (true) {
                s = ss.accept();
                System.out.println("Zglosil sie klient");
                number++;
                new ServiceThread(s, number).start();
            }
        } catch (Exception e) {
            System.err.println(e.getMessage());
            e.printStackTrace();
        }
        
    }

    public class ServiceThread extends java.lang.Thread {

        private Socket socket;
        private int number;

        public ServiceThread(Socket s, int n) {
            socket = s;
            number = n;
        }

        public void run() {
            
        }
    }
}
